// 时间范围
export const range_time = (start, end) => {
  const result = [];
  for (let i = start; i < end; i++) {
    result.push(i)
  }
  return result
}

// y轴单位
export const copywriting_collection = (type, data) => {
  switch (type) {
    case 'a':
      return {
        yAxisUnit: '%',
        yAxisLabel: '成功率(%)',
        yScaleDomain: [0, 100],
        yToolTipName: '超越测试表格1',
      }
    case 'b':
      return {
        yAxisUnit: '%',
        yAxisLabel: '成功率(%)',
        yScaleDomain: [0, 100],
        yToolTipName: '超越测试表格2',
      }
    case 'c':
      return {
        yAxisUnit: '%',
        yAxisLabel: '成功率(%)',
        yScaleDomain: [0, 100],
        yToolTipName: '超越测试表格3',
      }
    case 'd':
      return {
        yAxisUnit: '%',
        yAxisLabel: '成功率(%)',
        yScaleDomain: [0, 100],
        yToolTipName: '超越测试表格4',
      }
    case 'e':
      return {
        yAxisUnit: 'ms',
        yAxisLabel: '毫秒(ms)',
        yScaleDomain: data?.length ? undefined : [0, 100],
        yToolTipName: '超越测试表格5',
      }
    default:
      return {
        yAxisUnit: '',
        yAxisLabel: '',
        yScaleDomain: data?.length ? undefined : [0, 100],
        yToolTipName: '超越测试表格0',
      }
  }
}